package io;

import java.io.*;
import java.nio.charset.StandardCharsets;

public class Test1 {
    public static void main(String[] args) throws IOException {
        File file = new File("./src/main/java/io");
        FileFilter fileFilter = (File f)->f.getName().contains(".java");
        File[] files = file.listFiles(fileFilter);
        for (File file1:files) {
            FileInputStream fis = new FileInputStream(file1);
            byte[] data = new byte[(int)file1.length()];
            fis.read(data);
            String str = new String(data, StandardCharsets.UTF_8);
            System.out.println(str);
            System.out.println("******************************************************************");
        }
    }
}
